<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/astronaut32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/astronaut16.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">

<link rel="stylesheet" href="fonts.googleapis.com/css?family=EB Garamond:300,300italic,400,400italic,700,700italic|Cinzel Decorative:300,300italic,400,400italic,700,700italic|Noto Serif SC:300,300italic,400,400italic,700,700italic|Source Code Pro:300,300italic,400,400italic,700,700italic&display=swap&subset=latin,latin-ext">
<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.css">
  <link rel="stylesheet" href="/lib/pace/pace-theme-pace-theme-minimal.min.css">
  <script src="/lib/pace/pace.min.js"></script>

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"fat_fat_where_are_you.gitee.io","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":true,"show_result":true,"style":"mac"},"back2top":{"enable":false,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":true,"mediumzoom":false,"lazyload":true,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@500&display=swap" rel="stylesheet">
  <meta name="description" content="这篇笔记主要介绍《Head First HTML与CSS》有关CSS入门、增加字体和盒模型的部分">
<meta property="og:type" content="article">
<meta property="og:title" content="读《Head First HTML 与 CSS》3">
<meta property="og:url" content="http://fat_fat_where_are_you.gitee.io/archives/c10fa92e.html">
<meta property="og:site_name" content="肥肉啊肥肉你在哪">
<meta property="og:description" content="这篇笔记主要介绍《Head First HTML与CSS》有关CSS入门、增加字体和盒模型的部分">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://fat_fat_where_are_you.gitee.io/archives/c10fa92e/image-20200719153934588.png">
<meta property="og:image" content="http://fat_fat_where_are_you.gitee.io/archives/c10fa92e/image-20200719162130277.png">
<meta property="og:image" content="http://fat_fat_where_are_you.gitee.io/archives/c10fa92e/image-20200719162905214.png">
<meta property="og:image" content="http://fat_fat_where_are_you.gitee.io/archives/c10fa92e/image-20200719164321079.png">
<meta property="og:image" content="http://fat_fat_where_are_you.gitee.io/archives/c10fa92e/image-20200719164740026.png">
<meta property="og:image" content="http://fat_fat_where_are_you.gitee.io/archives/c10fa92e/image-20200729185643450.png">
<meta property="og:image" content="http://fat_fat_where_are_you.gitee.io/archives/c10fa92e/image-20200729191748646.png">
<meta property="og:image" content="http://fat_fat_where_are_you.gitee.io/archives/c10fa92e/image-20200801110239295.png">
<meta property="article:published_time" content="2020-07-19T07:00:30.000Z">
<meta property="article:modified_time" content="2020-07-19T07:00:30.000Z">
<meta property="article:author" content="肥肉啊肥肉你在哪">
<meta property="article:tag" content="HTML与CSS">
<meta property="article:tag" content="《Head First HTML与CSS》">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://fat_fat_where_are_you.gitee.io/archives/c10fa92e/image-20200719153934588.png">

<link rel="canonical" href="http://fat_fat_where_are_you.gitee.io/archives/c10fa92e.html">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>
<link rel="stylesheet" type="text/css" href="/css/injector/main.css"><link rel="preload" as="style" href="/css/injector/light.css"><link rel="preload" as="style" href="/css/injector/dark.css">
  <title>读《Head First HTML 与 CSS》3 | 肥肉啊肥肉你在哪</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

  <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">肥肉啊肥肉你在哪</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-movies">

    <a href="/movies/" rel="section"><i class="fa fa-film fa-fw"></i>观影</a>

  </li>
        <li class="menu-item menu-item-books">

    <a href="/books/" rel="section"><i class="fa fa-book fa-fw"></i>阅读</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" placeholder="搜索..." spellcheck="false" type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="reading-progress-bar"></div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://fat_fat_where_are_you.gitee.io/archives/c10fa92e.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/touxiang.gif">
      <meta itemprop="name" content="肥肉啊肥肉你在哪">
      <meta itemprop="description" content>
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="肥肉啊肥肉你在哪">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          读《Head First HTML 与 CSS》3
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2020-07-19 15:00:30" itemprop="dateCreated datePublished" datetime="2020-07-19T15:00:30+08:00">2020-07-19</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E5%89%8D%E7%AB%AF/" itemprop="url" rel="index"><span itemprop="name">前端</span></a>
                </span>
            </span>

          
          
          <br>
            <span id="/archives/c10fa92e.html" class="post-meta-item leancloud_visitors" data-flag-title="读《Head First HTML 与 CSS》3" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="far fa-comment"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/archives/c10fa92e.html#valine-comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/archives/c10fa92e.html" itemprop="commentCount"></span>
    </a>
  </span>
  
  <br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="far fa-file-word"></i>
              </span>
                <span class="post-meta-item-text">本文字数：</span>
              <span>4.2k</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="far fa-clock"></i>
              </span>
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              <span>4 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <blockquote>
<p>这篇笔记主要介绍《Head First HTML 与 CSS》有关 CSS 入门、增加字体和盒模型的部分</p>
</blockquote>
<span id="more"></span>

<h1 id="CSS 入门"><a href="#CSS 入门" class="headerlink" title="CSS 入门"></a>CSS 入门 </h1><h2 id="把 CSS 放入 HTML"><a href="# 把 CSS 放入 HTML" class="headerlink" title="把 CSS 放入 HTML"></a> 把 CSS 放入 HTML</h2><ul>
<li>示例代码</li>
</ul>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="meta-keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">title</span>&gt;</span>Document<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="css"></span></span><br><span class="line"><span class="css">        <span class="comment">/* 在此处添加 css */</span></span></span><br><span class="line"><span class="css">        <span class="selector-tag">p</span>&#123;</span></span><br><span class="line"><span class="css">            <span class="attribute">color</span>: pink;</span></span><br><span class="line"><span class="css">        &#125;</span></span><br><span class="line"><span class="css">    </span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line">    </span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>

<ul>
<li><p>CSS 书写格式</p>
<ul>
<li>在属性和相应值之间有一个冒号</li>
<li>最后要加一个分号</li>
<li>可去除换行写在一行</li>
<li>整个称为一个规则</li>
</ul>
</li>
<li><p>改变文本颜色是 color 属性，而没有 texcolor 属性</p>
</li>
<li><p>要为多个元素编写一个规则，只要在选择器之间加上逗号</p>
</li>
</ul>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">h1</span>,<span class="selector-tag">h2</span> &#123;</span><br><span class="line">    <span class="attribute">font-family</span>: sans-serif;</span><br><span class="line">    <span class="attribute">color</span>: pink;</span><br><span class="line">    <span class="comment">/* 在标题下增加下划线 */</span></span><br><span class="line">    <span class="attribute">border-bottom</span>: <span class="number">1px</span> solid black;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<ul>
<li>若用 underline 样式增加下划线，下划线只会出现在文本下边。而使用 border-buttom 的方式，下划线会延伸到页面边缘</li>
</ul>
<h2 id="通过图解研究选择器"><a href="# 通过图解研究选择器" class="headerlink" title="通过图解研究选择器"></a>通过图解研究选择器</h2><img data-src="/archives/c10fa92e/image-20200719153934588.png" class>

<h2 id="链接到外部样式表"><a href="# 链接到外部样式表" class="headerlink" title="链接到外部样式表"></a>链接到外部样式表</h2><ul>
<li>示例代码</li>
</ul>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="meta-keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">title</span>&gt;</span>Document<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">&quot;stylesheet&quot;</span> <span class="attr">href</span>=<span class="string">&quot;../xxx.css&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line">    </span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>

<ul>
<li>rel 属性指定了 HTML 文件与所链接的文件之间的关系。要链接到一个样式表，所以使用值 stylesheet</li>
<li><code>&lt;link&gt;</code>是一个 void 元素，没有结束标记</li>
</ul>
<h2 id="来谈谈继承"><a href="# 来谈谈继承" class="headerlink" title="来谈谈继承"></a>来谈谈继承</h2><ul>
<li>元素可以从它的父元素继承样式，<label style="color:red">不是所有元素都能继承</label>，只有一部分能继承，如 font-family</li>
<li>继承工作原理</li>
</ul>
<img data-src="/archives/c10fa92e/image-20200719162130277.png" class>

<ul>
<li><p>若把 font-family 属性上移到<code>&lt;body&gt;</code>，那它的所有子元素都会继承这个属性</p>
</li>
<li><p>可是，如果不希望每个 <code>&lt;body&gt;</code> 的子元素都继承同样的字体属性呢？可以用一个特定的规则来 <label style="color:red"> 覆盖继承</label></p>
<img data-src="/archives/c10fa92e/image-20200719162905214.png" class></li>
<li><p>对于 css，总会使用 <code> 最特定 </code> 的那个规则，后面讨论哪个规则最特定</p>
</li>
<li><p>一般来讲，如果样式会影响你的文本外观，这样的样式都能继承，如颜色、字体。其他属性不能继承，如边框</p>
</li>
</ul>
<h2 id="创建一个类选择器"><a href="# 创建一个类选择器" class="headerlink" title="创建一个类选择器"></a>创建一个类选择器</h2><ul>
<li><p>把元素加到一个类，例</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">&quot;greentea&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">img</span> <span class="attr">src</span>=<span class="string">&quot;&quot;</span> <span class="attr">alt</span>=<span class="string">&quot;&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br></pre></td></tr></table></figure></li>
<li><p>创建一个类选择器，例</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">p</span><span class="selector-class">.greentea</span>&#123;</span><br><span class="line">    <span class="attribute">color</span>: green;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></li>
</ul>
<img data-src="/archives/c10fa92e/image-20200719164321079.png" class>

<ul>
<li>如果仍然没有一个明确的赢家，要使用 CSS 文件中最后列出的规则（最靠后）</li>
</ul>
<img data-src="/archives/c10fa92e/image-20200719164740026.png" class>



<h1 id="增加字体和颜色模式"><a href="# 增加字体和颜色模式" class="headerlink" title="增加字体和颜色模式"></a>增加字体和颜色模式</h1><table>
<thead>
<tr>
<th align="center">属性</th>
<th align="center">说明</th>
</tr>
</thead>
<tbody><tr>
<td align="center">font-family</td>
<td align="center">字体系列</td>
</tr>
<tr>
<td align="center">font-size</td>
<td align="center">字体大小</td>
</tr>
<tr>
<td align="center">color</td>
<td align="center">文本颜色</td>
</tr>
<tr>
<td align="center">font-weight</td>
<td align="center">字体粗细</td>
</tr>
<tr>
<td align="center">text-decoration</td>
<td align="center">文本风格</td>
</tr>
</tbody></table>
<h2 id="字体系列"><a href="# 字体系列" class="headerlink" title="字体系列"></a>字体系列</h2><ul>
<li>每个 font-family 包含一组有共同特征的字体。共有 5 个字体系列：sans-serif，serif，monospace，cursive 和 fantasy。每个字体系列都包括大量字体，在页面上看到的只是每个字体系列中很少的几个字体例子。</li>
</ul>
<h3 id="使用 CSS 指定字体系列"><a href="# 使用 CSS 指定字体系列" class="headerlink" title="使用 CSS 指定字体系列"></a>使用 CSS 指定字体系列</h3><img data-src="/archives/c10fa92e/image-20200729185643450.png" class>

<ul>
<li>利用 font-family 属性，可以创建一个首选字体列表。我们希望大多数浏览器都能有你的第一个选择，不过，如果没有，至少可以确保浏览器能提供同一个字体系列中的一个通用字体。</li>
<li>若字体名字有空格，则需加上双引号。</li>
<li>sans-serif 和 serif 字体最全面通用。</li>
</ul>
<h3 id="引入 web 字体"><a href="# 引入 web 字体" class="headerlink" title="引入 web 字体"></a>引入 web 字体</h3><ul>
<li><p>web 字体如何工作</p>
<ol>
<li>要利用 web 字体，浏览器首先获取一个引用这些字体的 html 页面。</li>
<li>浏览器在获取这个页面所需的 web 文件。</li>
<li>现在，获取了字体后，浏览器显示页面时就会使用这个字体。</li>
</ol>
</li>
<li><p>如果你只是要测试字体，实际上可以把这些字体作为本地文件，存储在你自己的文件系统中并引用（就像存储和引用本地图像一样）。不过，如果你想为 Web 上的用户提供字体，就必须把这些文件放在一个服务器上，或者利用一个托管服务，如 Google 的字体托管跟务，这是免费的。</p>
</li>
<li><p>如何为页面增加 web 字体</p>
<ol>
<li>找的一个字体</li>
<li>确保有所需字体的所有格式</li>
<li>把你的字体文件放在 web 上</li>
<li>在 CSS 中添加 @font-face 属性</li>
</ol>
<img data-src="/archives/c10fa92e/image-20200729191748646.png" class>

<p>   5. 在 CSS 中使用 font-family 名</p>
<p>   6. 加载页面</p>
</li>
<li><p><code>@font-face</code>是一个内置 CSS 规则，而不是一个选择器规则。其他两个常用的内置规则：<code>@import</code>允许导入其他 CSS 文件（而不是 HTML 中通过一个 <code>&lt;link&gt;</code> 链入），另外 <code>@media</code> 允许创建特定于某些“媒体”类型的 CSS 规则，如印刷页、来面屏幕或手机。</p>
</li>
<li><p>托管字体服务 <a target="_blank" rel="external nofollow noopener noreferrer" href="http://www.fontsquirrel.com/">FonsSqpird</a>   <a target="_blank" rel="external nofollow noopener noreferrer" href="http://www.google.com/webfonts">Google Web 字体服务</a></p>
</li>
</ul>
<h2 id="调整字体大小"><a href="# 调整字体大小" class="headerlink" title="调整字体大小"></a>调整字体大小</h2><ul>
<li>px 按像素明确指定字体具体大小</li>
</ul>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">body</span> &#123;</span><br><span class="line">    <span class="attribute">font-size</span>:<span class="number">14px</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<ul>
<li>% 用百分号指定字体大小时，会相对于父元素字体大小指定这个字体有多大</li>
</ul>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">body</span> &#123;</span><br><span class="line">    <span class="attribute">font-size</span>:<span class="number">14px</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-tag">h1</span> &#123;</span><br><span class="line">    <span class="comment">/* 相对于父元素的 150%，h1 字体大小为 21px*/</span></span><br><span class="line">    <span class="attribute">font-size</span>:<span class="number">150%</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<ul>
<li>em 用 em 指定字体大小与百分数类似，会相对于父元素字体大小指定这个字体大小</li>
</ul>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">body</span> &#123;</span><br><span class="line">    <span class="attribute">font-size</span>:<span class="number">14px</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-tag">h2</span> &#123;</span><br><span class="line">    <span class="comment">/* 相对于父元素的 1.2 倍，h2 字体大小为 17px*/</span></span><br><span class="line">    <span class="attribute">font-size</span>:<span class="number">1.2em</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<ul>
<li>关键字 可以把一个字体大小指定为 xx-small,x-small,small,medium,large,x-large 或 xx-large, 浏览器会把这些关键字转换为像素值，它会使用浏览器中定义的默认值来完成这个转换。</li>
</ul>
<blockquote>
<p>那么，我到底该如何指定字体大小呢？<br>1. 选择一个关键字（推荐 small 或 medium），指定它作为 body 规则中的字体大小。这相当于页面的默认字体大小。<br>2. 使用 em 或百分数，相对于 body 字体大小指定其他元素的字体大小（选择 em 还是百分数由你决定，因为实际上这两种方法作用是一样的）。</p>
</blockquote>
<ul>
<li>如果没有指定自已大小，大多数情况下，浏览器默认字体大小为 16px。默认地，<code>&lt;h4&gt;</code>标题与 body 字体大小相同。</li>
</ul>
<h2 id="改变字体粗细"><a href="# 改变字体粗细" class="headerlink" title="改变字体粗细"></a>改变字体粗细</h2><ul>
<li><code>font-weight</code>控制文本粗细</li>
<li><code>font-weight:bold;</code>设置粗体</li>
<li><code>font-weight:normal;</code>去掉粗体样式</li>
<li>另外两个属性 <code>bolder</code> 和<code>lighter</code>会相对于所继承的值使文本样式稍粗一些或者稍细一些。这很少使用，因为没有多少字体支持粗细程度的细微差异，所以这两个值通常没有效果。</li>
<li>还可以把 font-weight 属性设置为 100 到 900 之间的一个数（100 的倍数），不过同样的，这个特性也未得到字体和浏览器的广泛支持，所以通常并不使用。</li>
</ul>
<h2 id="为字体增加风格"><a href="# 为字体增加风格" class="headerlink" title="为字体增加风格"></a>为字体增加风格</h2><ul>
<li>斜体风格 <code>font-style:italic;</code>或者<code> font-style:oblique;</code>。这两种风格看起来一样，除非确实非得区分斜体和倾斜文本，这对你非常重要，否则完全可以任选一种使用。</li>
</ul>
<h2 id="为字体增加颜色"><a href="# 为字体增加颜色" class="headerlink" title="为字体增加颜色"></a>为字体增加颜色</h2><ul>
<li><p><code>color</code>属性可以改变字体颜色。 </p>
</li>
<li><p>红绿蓝按不同比例组合成各种颜色。</p>
</li>
<li><p><strong>按颜色名指定颜色</strong>  CSS 大约定义了 150 个颜色名，如”red”、”green”、”blue”等。颜色名不区分大小写。</p>
</li>
<li><p><strong>用红绿蓝值指定颜色</strong>  </p>
</li>
</ul>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">body</span> &#123;</span><br><span class="line">    <span class="attribute">background-color</span>:<span class="built_in">rgb</span>(<span class="number">80%</span>,<span class="number">40%</span>,<span class="number">0%</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">body</span> &#123;</span><br><span class="line">    <span class="attribute">background-color</span>:<span class="built_in">rgb</span>(<span class="number">204</span>,<span class="number">102</span>,<span class="number">0</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<ul>
<li><strong>使用十六进制码指定颜色</strong>  每组 2 位数字分别代表红绿蓝分量，如果每一组分量中两位数字都相同，可以简写。例加，#ccbb00 可以缩写为 #cb0，或者#11eeaa 可以缩写为#1ea。不过，加果十六进制码是#ccbb10，则不能使用缩写。</li>
</ul>
<h2 id="增加文本装饰"><a href="# 增加文本装饰" class="headerlink" title="增加文本装饰"></a>增加文本装饰</h2><ul>
<li><code>text-decoration</code>属性可以增加文本装饰。</li>
</ul>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">em</span> &#123;</span><br><span class="line">    <span class="comment">/* 为 &lt;em&gt; 元素添加删除线 */</span></span><br><span class="line">    <span class="attribute">text-decoration</span>:line-through;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">em</span> &#123;</span><br><span class="line">    <span class="comment">/* 一次可以设置多个装饰，为 &lt;em&gt; 元素添加下划线和上划线 */</span></span><br><span class="line">    <span class="attribute">text-decoration</span>:underline overline;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">em</span> &#123;</span><br><span class="line">    <span class="comment">/* 如果文本继承了不想要的装饰，可以使用”none“来删去装饰 */</span></span><br><span class="line">    <span class="attribute">text-decoration</span>:none;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<ul>
<li><p>如果 <code>&lt;em&gt;</code> 有两个不同规则，一个指定上划线，一个指定下划线，它们不会累加。只有在同一个 <code>text-decoration</code> 声明中同时指定，才会得到两个装饰。</p>
</li>
<li><p>HTML 的 <code>&lt;del&gt;</code> 标签表示一些被从文档中删除的文字内容。比如可以在需要显示修改记录或者源代码差异的情况使用这个标签。这个标签通常（但不一定要）在文字上显示删除线。</p>
</li>
<li><p><code>&lt;ins&gt;</code>标签表示文档中添加的内容。这个标签通常（但不一定要）在文字上显示下划线。</p>
</li>
</ul>
<img data-src="/archives/c10fa92e/image-20200801110239295.png" class>
    </div>

    
    
    
      
  <div class="popular-posts-header">相关文章推荐</div>
  <ul class="popular-posts">
    <li class="popular-posts-item">
      <div class="popular-posts-title"><a href="\archives\bf6c3536.html" rel="bookmark">读《Head First HTML 与 CSS》上</a></div>
    </li>
    <li class="popular-posts-item">
      <div class="popular-posts-title"><a href="\archives\88f0ef65.html" rel="bookmark">HTML 与 CSS 学习 1</a></div>
    </li>
    <li class="popular-posts-item">
      <div class="popular-posts-title"><a href="\archives\11f9bedf.html" rel="bookmark">HTML 与 CSS 学习 2</a></div>
    </li>
    <li class="popular-posts-item">
      <div class="popular-posts-title"><a href="\archives\66fe8e49.html" rel="bookmark">HTML 与 CSS 学习 3</a></div>
    </li>
    <li class="popular-posts-item">
      <div class="popular-posts-title"><a href="\archives\f89a1bea.html" rel="bookmark">HTML 与 CSS 学习 4</a></div>
    </li>
  </ul>

        <div class="reward-container">
  <div>感谢各位打赏的小伙伴</div>
  <button onclick="var qr = document.getElementById('qr'); qr.style.display = (qr.style.display === 'none') ? 'block' : 'none';">
    打赏
  </button>
  <div id="qr" style="display: none;">
      
      <div style="display: inline-block;">
        <img src="/images/wechatpay.png" alt="肥肉啊肥肉你在哪 微信支付">
        <p>微信支付</p>
      </div>
      
      <div style="display: inline-block;">
        <img src="/images/alipay.png" alt="肥肉啊肥肉你在哪 支付宝">
        <p>支付宝</p>
      </div>

  </div>
</div>

        

<div>
<ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者： </strong>肥肉啊肥肉你在哪
  </li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="http://fat_fat_where_are_you.gitee.io/archives/c10fa92e.html" title="读《Head First HTML 与 CSS》3">http://fat_fat_where_are_you.gitee.io/archives/c10fa92e.html</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="external nofollow noopener noreferrer" target="_blank"><i class="fab fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！
  </li>
</ul>
</div>


      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/HTML%E4%B8%8ECSS/" rel="tag"><i class="fas fa-tags"></i> HTML与CSS</a>
              <a href="/tags/%E3%80%8AHead-First-HTML%E4%B8%8ECSS%E3%80%8B/" rel="tag"><i class="fas fa-tags"></i> 《Head First HTML与CSS》</a>
          </div>

        
  <div class="post-widgets">
    <div class="wp_rating">
      <div id="wpac-rating"></div>
    </div>
  </div>


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/archives/f89a1bea.html" rel="prev" title="HTML 与 CSS 学习 4">
      <i class="fa fa-chevron-left"></i> HTML 与 CSS 学习 4
    </a></div>
      <div class="post-nav-item">
    <a href="/archives/5606f168.html" rel="next" title="JavaScript 基础语法 1">
      JavaScript 基础语法 1 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          
    <div class="comments" id="valine-comments"></div>

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#CSS%20%E5%85%A5%E9%97%A8"><span class="nav-text">CSS 入门 </span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%8A%8A%20CSS%20%E6%94%BE%E5%85%A5%20HTML"><span class="nav-text"> 把 CSS 放入 HTML</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%80%9A%E8%BF%87%E5%9B%BE%E8%A7%A3%E7%A0%94%E7%A9%B6%E9%80%89%E6%8B%A9%E5%99%A8"><span class="nav-text">通过图解研究选择器</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%93%BE%E6%8E%A5%E5%88%B0%E5%A4%96%E9%83%A8%E6%A0%B7%E5%BC%8F%E8%A1%A8"><span class="nav-text">链接到外部样式表</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%9D%A5%E8%B0%88%E8%B0%88%E7%BB%A7%E6%89%BF"><span class="nav-text">来谈谈继承</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E7%B1%BB%E9%80%89%E6%8B%A9%E5%99%A8"><span class="nav-text">创建一个类选择器</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%A2%9E%E5%8A%A0%E5%AD%97%E4%BD%93%E5%92%8C%E9%A2%9C%E8%89%B2%E6%A8%A1%E5%BC%8F"><span class="nav-text">增加字体和颜色模式</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AD%97%E4%BD%93%E7%B3%BB%E5%88%97"><span class="nav-text">字体系列</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BD%BF%E7%94%A8%20CSS%20%E6%8C%87%E5%AE%9A%E5%AD%97%E4%BD%93%E7%B3%BB%E5%88%97"><span class="nav-text">使用 CSS 指定字体系列</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%BC%95%E5%85%A5%20web%20%E5%AD%97%E4%BD%93"><span class="nav-text">引入 web 字体</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%B0%83%E6%95%B4%E5%AD%97%E4%BD%93%E5%A4%A7%E5%B0%8F"><span class="nav-text">调整字体大小</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%94%B9%E5%8F%98%E5%AD%97%E4%BD%93%E7%B2%97%E7%BB%86"><span class="nav-text">改变字体粗细</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B8%BA%E5%AD%97%E4%BD%93%E5%A2%9E%E5%8A%A0%E9%A3%8E%E6%A0%BC"><span class="nav-text">为字体增加风格</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B8%BA%E5%AD%97%E4%BD%93%E5%A2%9E%E5%8A%A0%E9%A2%9C%E8%89%B2"><span class="nav-text">为字体增加颜色</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%A2%9E%E5%8A%A0%E6%96%87%E6%9C%AC%E8%A3%85%E9%A5%B0"><span class="nav-text">增加文本装饰</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="肥肉啊肥肉你在哪" src="/images/touxiang.gif">
  <p class="site-author-name" itemprop="name">肥肉啊肥肉你在哪</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">38</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">16</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/feirouafeirou" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;feirouafeirou" rel="external nofollow noopener noreferrer" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="http://wpa.qq.com/msgrd?v=3&uin=1729013657&site=qq&menu=yes" title="QQ → http:&#x2F;&#x2F;wpa.qq.com&#x2F;msgrd?v&#x3D;3&amp;uin&#x3D;1729013657&amp;site&#x3D;qq&amp;menu&#x3D;yes" rel="external nofollow noopener noreferrer" target="_blank"><i class="fab fa-qq fa-fw"></i>QQ</a>
      </span>
  </div>


  <div class="links-of-blogroll motion-element">
    <div class="links-of-blogroll-title"><i class="fa fa-link fa-fw"></i>
      友情链接
    </div>
    <ul class="links-of-blogroll-list">
        <li class="links-of-blogroll-item">
          <a href="http://www.woshipm.com/" title="http:&#x2F;&#x2F;www.woshipm.com" rel="external nofollow noopener noreferrer" target="_blank">人人都是产品经理</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="http://www.chanpin100.com/" title="http:&#x2F;&#x2F;www.chanpin100.com" rel="external nofollow noopener noreferrer" target="_blank">产品壹佰</a>
        </li>
    </ul>
  </div>

      </div>

    </div>
  </aside>

  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 2020 – 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">肥肉啊肥肉你在哪</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-area"></i>
    </span>
    <span title="站点总字数">237k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    <span title="站点阅读时长">3:35</span>
</div>

<div class="translate-style">
繁/简：<a id="translateLink" href="javascript:translatePage();">繁体
</a>
</div>
<script type="text/javascript" src="/js/tw_cn.js"></script>
<script type="text/javascript">
var defaultEncoding = 2; //网站编写字体是否繁体，1-繁体，2-简体
var translateDelay = 0; //延迟时间,若不在前, 要设定延迟翻译时间, 如100表示100ms,默认为0
var cookieDomain = "https://feirouafeirou.github.io/"; //Cookie地址, 一定要设定, 通常为你的网址
var msgToTraditionalChinese = "繁体"; //此处可以更改为你想要显示的文字
var msgToSimplifiedChinese = "简体"; //同上，但两处均不建议更改
var translateButtonId = "translateLink"; //默认互换id
translateInitilization();
</script>


        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js"></script>
  <script src="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/lozad@1/dist/lozad.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>


  <script defer src="/lib/three/three.min.js"></script>


  



  <script>
  if (CONFIG.page.isPost) {
    wpac_init = window.wpac_init || [];
    wpac_init.push({
      widget: 'Rating',
      id    : 26171,
      el    : 'wpac-rating',
      color : 'fc6423'
    });
    (function() {
      if ('WIDGETPACK_LOADED' in window) return;
      WIDGETPACK_LOADED = true;
      var mc = document.createElement('script');
      mc.type = 'text/javascript';
      mc.async = true;
      mc.src = '//embed.widgetpack.com/widget.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(mc, s.nextSibling);
    })();
  }
  </script>

  
<script src="/js/local-search.js"></script>













  

  


<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
  NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
    var GUEST = ['nick', 'mail'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.includes(item);
    });
    new Valine({
      el         : '#valine-comments',
      verify     : false,
      notify     : false,
      appId      : 'puzQn5yHhkbtBj2VGFbqJ4FE-MdYXbMMI',
      appKey     : 'lmcgKM2surcxNxMRiqInHjkU',
      placeholder: "Just go go",
      avatar     : 'retro',
      meta       : guest,
      pageSize   : '10' || 10,
      visitor    : true,
      lang       : '' || 'zh-cn',
      path       : location.pathname,
      recordIP   : false,
      serverURLs : ''
    });
  }, window.Valine);
});
</script>
<div class="moon-menu">
  <div class="moon-menu-items">
    
    <div id="moon-menu-item-back2bottom" class="moon-menu-item" onclick="back2bottom()">
      <i class="fa fa-chevron-down"></i>    </div>
    
    <div id="moon-menu-item-back2top" class="moon-menu-item" onclick="back2top()">
      <i class="fa fa-chevron-up"></i>    </div>
    
  </div>
  <div class="moon-menu-button">
    <svg class="moon-menu-bg">
      <circle class="moon-menu-cricle" cx="50%" cy="50%" r="44%"/>
      <circle class="moon-menu-border" cx="50%" cy="50%" r="48%"/>
    </svg>
    <div class="moon-menu-content">
      <div class="moon-menu-icon"><i class="fas fa-ellipsis-v"></i></div>
      <div class="moon-menu-text"></div>
    </div>
  </div>
</div><script src="/js/injector.js"></script>
<!-- 数字雨 -->
<!-- <canvas id="canvas" width="1440" height="900" ></canvas> -->
<!-- <script type="text/javascript" src="/js/src/DigitalRain.js"></script> -->
<!-- 页面点击小红心 -->
<script type="text/javascript" src="/js/src/clicklove.js"></script>
<!--浏览器搞笑标题-->
<script type="text/javascript" src="/js/FunnyTitle.js"></script>
<!-- Live2D看板娘 -->
<!-- <script src="/live2d-widget/autoload.js"></script> -->
<!-- <script src="https://feirouafeirou.github.io/live2d-widget/autoload.js"></script> -->
<!-- 网页音乐播放器 -->
<!-- <link rel="stylesheet" href="/dist/APlayer.min.css">
<div id="aplayer"></div>
<script type="text/javascript" src="/dist/APlayer.min.js"></script>
<script type="text/javascript" src="/dist/music.js"></script> -->
</body>

</html>
